#include <stdio.h>

int sum_array(int n, int a[n]);

int main(void)
{
    int b[5] = {1, 2, 3, 4, 5};

    printf("The sum is %d \n", sum_array(5, b));

    return 0;
}

int sum_array(int n, int a[n])
{
    int i, sum = 0;

    for (i = 0; i < n; i++)
    {
        sum += a[i];
    }

    return sum;
}